-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some cubemap reflections issues #1311
Fix some cubemap reflections issues #1311
Conversation
41b1afd
to
655ae65
Compare
Added a fix to stop UI from being rendered into the cubemaps, and added an |
The cubemaps are pretty much rendered correctly now, however there's some bug with |
259ac9a
to
3fd7a50
Compare
Fixed the issue with colour grading now. This now properly renders cubemaps, the reflections work. |
AMD Radeon PRO W7600 (navi33), Mesa 24.0.9 radeonsi, Linux: 20240919-214537-000.unvanquished-relief-mapping.webm |
Good. This is pr is more less ready, I just wanna see if I can add a couple more settings/debug cvars for this. |
Thanks! I'll see if I can add a cvar to be able to set the size of reflection cubemaps as well. |
Added a cvar to see only the reflections themselves. |
763ae70
to
d1df0c7
Compare
2400b08
to
ed01ebf
Compare
More screenshots by @illwieckz: |
ed01ebf
to
75efb6f
Compare
75efb6f
to
9537561
Compare
9537561
to
1a5f2a4
Compare
16ac017
to
065da5e
Compare
This allows seeing the contents of the selected cubemap.
The comment about a bugfix seems to be wrong since: 1. We only run it at 32x32 2. It tries to read out of bounds data, so it was never correct in the first place
065da5e
to
f0fe22c
Compare
I've added a commit that stops probes from being added in the void. There are still some around patch meshes though. Skies also tend to generate some in unreachable areas, due to how skybrushes are placed. |
d9f0010
to
d3dc97c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drawing the cubemap images with r_showCubeProbes still doesn't seem quite right. The image can change discontinously with a slight movement and for some reason it's all white a lot of times. I guess it's better than before though
Yeah, noticed both of that too sometimes, don't know the reason yet though. |
724f0df
to
c5a586f
Compare
Debug option: render from the perspective of a selected face of a cubemap after the static reflections cubemaps are built. The index is a global index, where each 6 consecutive indices correspond to one cubemap; -1: disabled. .
This should help a bit with reflections disappearing until a proper solution is implemented.
Debug cvar to see only what gets reflected. This requires running `/buildcubemaps` *after* `/vid_restart`.
Add a cvar to set static reflections cubemaps size.
c5a586f
to
02f0776
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
02f0776
to
4da8463
Compare
Fixes:
Reading data into cubemaps
Texture coordinates on debug probes when using
r_showCubeProbes on
Overbright on debug probes
A culling issue when used with the material system
Incorrect texture bind
Colour grading setup for the reflection cubemaps
Also made the highligting of the selected cubemaps use an outline so the contents of the cubemap can still be seen.
Added
r_showCubeProbeFace
andr_showReflectionMaps
for debugging.Added
r_cubeProbeSize
to allow for custom reflection cubemap sizes.Hash epsilon for cubemaps hashTable slightly increased.
See below for screenshots.
The reflections also correctly show up on surfaces (although the cubemap selection is still bad).